<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
    <link href="${ctx}/static/inspinia/js/plugins/fontawesome-iconpicker/css/fontawesome-iconpicker.min.css" rel="stylesheet">
    
</head>
<body>
<div class="row wrapper wrapper-content">
    <div class="col-sm-12">
        <form id="form" method="get" class="form-horizontal" data-ajax="" data-function="refresh" action="${ctx}/admin/sys/module/${method}">
            <input  type="hidden" name="pid" value="${pid}"/>
            <input  type="hidden" name="id" value="${module.id}"/>
            <div class="form-group">
                <label class="col-sm-3 control-label">模块名称</label>
                <div class="input-group col-sm-6">
                    <input type="text" name="title" class="form-control" value="${module.title}" placeholder="请输入模块名称" required="true" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">模块地址</label>
                <div class="input-group col-sm-6">
                    <input type="text" name="url" class="form-control" value="${module.url}" placeholder="请输入模块地址" required/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">模块标识</label>
                <div class="input-group col-sm-6">
                    <input type="text" name="code" class="form-control" value="${module.code}" placeholder="请输入模块标识"  required/>
                </div>
            </div>
            <%--<div class="form-group">
                <label class="col-sm-3 control-label">模块所属</label>
                <div class="input-group col-sm-6">
                    <select class="form-control" name="sysFlag" >
                        <option value="">--请选择模块所属--</option>
                        <c:forEach var="sysflag" items="${sysflags}">
                            <option value="${sysflag.status()}" <c:if test="${sysflag.status()==module.sysFlag}">selected</c:if>  >
                                <c:choose>
                                    <c:when test="${sysflag.status()==1}">总公司</c:when>
                                    <c:when test="${sysflag.status()==2}">子公司</c:when>
                                    <c:otherwise>无</c:otherwise>
                                </c:choose>
                            </option>
                        </c:forEach>
                    </select>
                    &lt;%&ndash;       <input type="checkbox" class="i-checks" value="2" name="sysFlag" <c:if test="${module.sysFlag=='2'}">checked</c:if>>&ndash;%&gt;
                </div>
            </div>--%>
            <div class="form-group">
                <label class="col-sm-3 control-label">模块类别</label>
                <div class="input-group col-sm-9">
                    <label class="checkbox-inline i-checks"><input type="radio" value="1" id="category1" name="category" class="{required:true}" data-checked="${module.category}">菜单</label>
                    <label class="checkbox-inline i-checks"><input type="radio" value="2" id="category2" name="category">功能</label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">模块图标</label>
                <div class="input-group  col-sm-6">
                    <input type="text" id="ico" name="ico" class="form-control icp icp-auto" value="${module.ico}" placeholder="模块图标"  data-placement="bottomRight"  />
                    <span class="input-group-addon"></span>
                </div>
            </div>
            <div class="form-group ">
                <label class="col-sm-3 control-label">模块排序</label>
                <div class="input-group col-sm-6">
                    <input type="text" name="orderno" class="form-control" value="${module.orderno}" placeholder="请输入模块排序"  />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">模块说明</label>
                <div class="input-group col-sm-6">
                    <input type="text" name="intro" class="form-control" value="${module.intro}" placeholder="请输入模块说明"  />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-4 col-sm-offset-3">
                    <button class="btn btn-primary" type="submit">保存</button>
                    <a class="btn btn-white " layer-close="" href="javascript:void(0);">取消</a>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="${ctx}/static/inspinia/js/plugins/fontawesome-iconpicker/js/fontawesome-iconpicker.min.js"></script>
<script>
    var refresh =function(data){

        var iframeId = parent.$("#pages_tabs li.active").find("a").attr("href");
        parent.$(iframeId).find("iframe")[0].contentWindow.refresh();
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index); //再执行关闭
    }
    $(function() {
        $('.icp-auto').iconpicker();
    });
    
</script>

</body>

</html>
